/*
* Created by: yyf
* Description: 基金管理--拟设立基金--基金详情编辑
*/
<template>
    <div>
        <el-row>
            <el-col :span="16" class="ca-title ca-m-b-20">
                <h3>基本信息</h3>
            </el-col>
            <el-col :span="8" class="ca-align-right ca-m-b-10">
                <el-button type="primary" size="medium" @click="save()">保存</el-button>
                <el-button size="medium" @click="close()">取消</el-button>
            </el-col>
        </el-row>
        <el-form class="ca-p-l-20 ca-p-r-20" label-width="120px" :model="fundDetail">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="基金委派代表：">
                        <el-input v-model="fundDetail.fundDelegate" :maxlength="300"></el-input>
                    </el-form-item>
                    <el-form-item label="注册地：">
                        <el-input v-model="fundDetail.place" :maxlength="300"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="基金托管人：">
                        <el-input v-model="fundDetail.custodian" :maxlength="300"></el-input>
                    </el-form-item>
                    <el-form-item label="办公地：">
                        <el-input v-model="fundDetail.officeLand" :maxlength="300"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-form-item label="管理费：">
                    <el-input type="textarea" v-model="fundDetail.proportion" :maxlength="3000"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item label="业务报酬：">
                    <el-input type="textarea" v-model="fundDetail.achievement" :maxlength="3000"></el-input>
                </el-form-item>
            </el-row>
            <el-row>
                <el-form-item label="其他：">
                    <el-input type="textarea" v-model="fundDetail.other" :maxlength="3000"></el-input>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
</template>
<script type="text/ecmascript-6">
    import {api} from '../api';
    import {STATUS_HTTP_SUCCESS, apiHttp} from '__service/csHttp';
    export default {
        data() {
            return {}
        },
        props: {
            fundDetail: {
                type: Object,
                default() {
                    return {}
                }
            }
        },
        watch: {
        },
        methods: {
            // 保存
            async save() {
                let {resCode} = await apiHttp(api.ESTABLISHING_FUNDS_DETAILS_EDIT, this.fundDetail);
                if (resCode === STATUS_HTTP_SUCCESS) {
                    this.$message({
                        type: 'success',
                        message: '修改成功！',
                        center: true,
                    })
                    // 添加小红点
                    this.$emit('addRedDot');
                    this.close();
                }
            },
            // 取消
            close() {
                this.$emit('changeEdit', false)
            },
        },
    }
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
</style>
